package com.hsc.yalebao.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.hsc.yalebao.model.IssueListBaseBean;
import java.io.PrintStream;
import java.util.ArrayList;

public class ZoushituAdapter extends BaseAdapter
{
  private Context context;
  private ArrayList<IssueListBaseBean> issueListBaseBeanList;
  ArrayList<String> results = new ArrayList();

  public ZoushituAdapter(Context paramContext, ArrayList<IssueListBaseBean> paramArrayList)
  {
    this.issueListBaseBeanList = paramArrayList;
    this.context = paramContext;
    this.results.add("大");
    this.results.add("小");
    this.results.add("单");
    this.results.add("双");
    this.results.add("大单");
    this.results.add("小单");
    this.results.add("大双");
    this.results.add("小双");
  }

  private int getColor(String paramString)
  {
    int i = -1;
    if ("大".equals(paramString))
      i = -10115329;
    if ("小".equals(paramString))
      i = -10115329;
    if ("单".equals(paramString))
      i = -10106113;
    if ("双".equals(paramString))
      i = -10106113;
    if ("大单".equals(paramString))
      i = -6517253;
    if ("小单".equals(paramString))
      i = -6517253;
    if ("大双".equals(paramString))
      i = -6517253;
    if ("小双".equals(paramString))
      i = -6517253;
    return i;
  }

  private int getTvPosition(String paramString)
  {
    if ("大".equals(paramString));
    boolean bool = "小".equals(paramString);
    int i = 0;
    if (bool)
      i = 1;
    if ("单".equals(paramString))
      i = 2;
    if ("双".equals(paramString))
      i = 3;
    if ("大单".equals(paramString))
      i = 4;
    if ("小单".equals(paramString))
      i = 5;
    if ("大双".equals(paramString))
      i = 6;
    if ("小双".equals(paramString))
      i = 7;
    return i;
  }

  public int getCount()
  {
    if (this.issueListBaseBeanList == null)
      return 0;
    return this.issueListBaseBeanList.size();
  }

  public Object getItem(int paramInt)
  {
    return this.issueListBaseBeanList.get(paramInt);
  }

  public long getItemId(int paramInt)
  {
    return paramInt;
  }

  public View getView(int paramInt, View paramView, ViewGroup paramViewGroup)
  {
    ViewHolder localViewHolder;
    String[] arrayOfString;
    int i;
    if (paramView == null)
    {
      paramView = View.inflate(this.context, 2130903192, null);
      localViewHolder = new ViewHolder();
      localViewHolder.ll_item_bg = ((RelativeLayout)paramView.findViewById(2131100078));
      localViewHolder.tv_issue = ((TextView)paramView.findViewById(2131100267));
      localViewHolder.tv_SumValue = ((TextView)paramView.findViewById(2131100268));
      localViewHolder.tv_da = ((TextView)paramView.findViewById(2131100269));
      localViewHolder.tv_xiao = ((TextView)paramView.findViewById(2131100270));
      localViewHolder.tv_dan = ((TextView)paramView.findViewById(2131100271));
      localViewHolder.tv_shuang = ((TextView)paramView.findViewById(2131100272));
      localViewHolder.tv_dadan = ((TextView)paramView.findViewById(2131100273));
      localViewHolder.tv_dashuang = ((TextView)paramView.findViewById(2131100275));
      localViewHolder.tv_xiaodan = ((TextView)paramView.findViewById(2131100274));
      localViewHolder.tv_xiaoshuang = ((TextView)paramView.findViewById(2131100276));
      localViewHolder.tv_array.add(localViewHolder.tv_da);
      localViewHolder.tv_array.add(localViewHolder.tv_xiao);
      localViewHolder.tv_array.add(localViewHolder.tv_dan);
      localViewHolder.tv_array.add(localViewHolder.tv_shuang);
      localViewHolder.tv_array.add(localViewHolder.tv_dadan);
      localViewHolder.tv_array.add(localViewHolder.tv_xiaodan);
      localViewHolder.tv_array.add(localViewHolder.tv_dashuang);
      localViewHolder.tv_array.add(localViewHolder.tv_xiaoshuang);
      paramView.setTag(localViewHolder);
      IssueListBaseBean localIssueListBaseBean = (IssueListBaseBean)this.issueListBaseBeanList.get(paramInt);
      localViewHolder.tv_issue.setText(localIssueListBaseBean.Issue);
      localViewHolder.tv_SumValue.setText(localIssueListBaseBean.SumValue);
      arrayOfString = localIssueListBaseBean.RealWin.split(",");
      i = 0;
      label376: if (i < localViewHolder.tv_array.size())
        break label442;
      if ((arrayOfString == null) || (arrayOfString.length < 3));
    }
    for (int j = 0; ; j++)
    {
      if (j >= arrayOfString.length)
      {
        if (paramInt % 2 != 0)
          break label609;
        localViewHolder.ll_item_bg.setBackgroundColor(-657416);
        return paramView;
        localViewHolder = (ViewHolder)paramView.getTag();
        break;
        label442: ((TextView)localViewHolder.tv_array.get(i)).setText("");
        ((TextView)localViewHolder.tv_array.get(i)).setTextColor(-1);
        ((TextView)localViewHolder.tv_array.get(i)).setBackgroundColor(16777215);
        i++;
        break label376;
      }
      if (this.results.contains(arrayOfString[j]))
      {
        System.out.println("给走势图赋值======" + arrayOfString[j]);
        int k = getTvPosition(arrayOfString[j]);
        int m = getColor(arrayOfString[j]);
        ((TextView)localViewHolder.tv_array.get(k)).setText(arrayOfString[j]);
        ((TextView)localViewHolder.tv_array.get(k)).setBackgroundColor(m);
      }
    }
    label609: localViewHolder.ll_item_bg.setBackgroundColor(-1);
    return paramView;
  }

  public void setData(ArrayList<IssueListBaseBean> paramArrayList)
  {
    this.issueListBaseBeanList = paramArrayList;
  }

  static class ViewHolder
  {
    public RelativeLayout ll_item_bg;
    public TextView tv_SumValue;
    public ArrayList<TextView> tv_array = new ArrayList();
    public TextView tv_da;
    public TextView tv_dadan;
    public TextView tv_dan;
    public TextView tv_dashuang;
    public TextView tv_issue;
    public TextView tv_shuang;
    public TextView tv_xiao;
    public TextView tv_xiaodan;
    public TextView tv_xiaoshuang;
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.hsc.yalebao.adapter.ZoushituAdapter
 * JD-Core Version:    0.6.2
 */